﻿package com.ufenlei.LTS {
	import flash.display.MovieClip;
	import flash.events.MouseEvent;

	public class VolumeSlide extends HSlide{
		public function VolumeSlide(defaultPosition:Number = 0, lowPosition:Number = 0, highPosition:Number = 1.0, isLocked:Boolean = false){
			super(defaultPosition,lowPosition,highPosition,isLocked);
			trace((vPath as MovieClip).getBounds(this));
			initSlide(vHandle,vPath);
			initView();
			slideback.addEventListener(MouseEvent.CLICK, onBackClick);
		}
		private function onBackClick(evt:MouseEvent):void{
			var mx:int = Math.max(_zero,Math.min(evt.localX,_zero + _length));
			this.position = mx;
			this.dispatchProgEvent();
		}
	}
}